import { Body, Get, Post } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
var moment = require('moment');
import Controller from 'src/admin/decorator/controller.decorator';
import { errorReturn } from 'src/utils';
import { LoginDto } from './login.dto';
import { LoginService } from './login.service';

@Controller('login')
export class LoginController {
    constructor(private config : ConfigService, private loginService : LoginService) {}
    @Post()
    login(@Body() params:LoginDto) {
        this.loginService.wechatLogin('sdfd')
        return 'sdfsfsdfsdf'
        //return this.loginService.login(params.account, params.password)
        
    }

    @Get('d')
    d(){
        this.loginService.wechatLogin('sdfd')
        return 'sdfsfsdfsdf'
    }
}